<h1>Listing courses</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Classroom</th>
    <th>Duration</th>
    <th>Started at</th>
    <th>Finished at</th>
    <th>Menu</th>
    <th>Objective</th>
    <th>Programatic content</th>
    <th>Bibliography</th>
    <th>Published</th>
    <th>Minimum</th>
    <th>Maximum</th>
    <th>User</th>
    <th>Category</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

  <% @courses.each do |course| %>
    <tr>
      <td><%= course.name %></td>
      <td><%= course.classroom %></td>
      <td><%= course.duration %></td>
      <td><%= course.started_at %></td>
      <td><%= course.finished_at %></td>
      <td><%= course.menu %></td>
      <td><%= course.objective %></td>
      <td><%= course.programatic_content %></td>
      <td><%= course.bibliography %></td>
      <td><%= course.published %></td>
      <td><%= course.minimum %></td>
      <td><%= course.maximum %></td>
      <td><%= course.user.name %></td>
      <td><%= course.category.name %></td>
      <td><%= link_to 'Show', course %></td>
      <td><%= link_to 'Edit', edit_course_path(course) %></td>
      <td><%= link_to 'Destroy', course, :confirm => 'Are you sure?', :method => :delete %></td>
    </tr>
  <% end %>
</table>

<br />

<%= link_to 'New Course', new_course_path %>
